package com.yingxin.yxerp.module.appversion.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yingxin.yx.framework.redis.lock.Lockable;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Collections;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_appversion")
public class AppVersion implements Lockable, Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id",type = IdType.AUTO)
    private String id;

    /**
     * app名称
     */
    private String appName;

    /**
     * 类型
     */
    private String type;

    /**
     * 版本
     */
    private String version;

    /**
     * 版本代号
     */
    private Integer codeVersion;

    /**
     * 更新说明
     */
    private String versionDesc;

    /**
     * 更新人ID
     */
    private String versionId;

    /**
     * 更新时间
     */
    private Date versionTime;

    @Override
    public List<String> keys() {
        return Collections.singletonList(id);
    }
}
